/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Lab_v3;

import java.util.Hashtable;
/**
 *
 * @author salman
 */
public class dbtables_test_metadata extends dbtables_handler {

    private static String table_name= "test_metadata";

    public dbtables_test_metadata(String database_type,String database_name)
    {
       super(database_type,database_name);
//        if (table_name != null)
//        {
//           table_name =  new_table_name;
//        }
        p_table_name = table_name;

    }

    public void insertSingleEntry(String key,String test_name,String test_description)
    {
        String insertParameters = "'"+key+"','"+test_name+"','"+test_description+"'";
       // insertParameters = "'18','jsdfsdfhds','sdsdfdsfsdfsd'";
       // String s = "'11','shit','de  sdfsdf s fdsshit'";
        insertData(insertParameters);

    }

    public void viewAllEntries()
    {
      String[] fieldNames = {"test_id","test_name","test_description"};
        fetchAndViewAllData (fieldNames);
    }

    public Hashtable getSingleTest(String searchfeildColumn,String searchfieldValue)
    {
       String[] fieldNames = {"test_id","test_name","test_description"};
       Hashtable a = new Hashtable();
   a = fetchSingleRow (searchfeildColumn,searchfieldValue,fieldNames);
       return a;
    }

        public Hashtable getAllTests()
    {
       String[] fieldNames = {"test_id","test_name","test_description"};
       Hashtable a = new Hashtable();
   a = fetchAllRows (null,null,fieldNames);
       return a;
    }
}
